<?php print $this->doctype()?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl">
<head>
	<?php
		print $this->headBase();
    	print $this->headMeta();
    	print $this->headTitle();
    	print $this->headScript();
    	print $this->headLink();
    	print $this->headStyle();
    ?>
</head>

<body>

<div id="wrapper">
	<?php print $this->partial('_partial/head.phtml')?>
	
	<div id="bar">
		<ul>
			<li class="breadcrumb">
			<b>Obecnie znajdujesz się w:</b>
				<?php
					/* @var $nav Zend_View_Helper_Navigation_Breadcrumbs */
					$nav =  $this->getHelper('site')
								 ->get('navigation')
								 ->getViewHelperNavigation('breadcrumbs');
					
					$nav->setMinDepth(-1);
								 
					$cot = $nav->getContainer();
					
					// znajdz aktywną stronę!
					if (null != ($page = $cot->findBy('alias', $this->urlParams('alias')))) {
						$page->setActive(true);
					}
					
					if ($this->urlParams('module') == 'gallery') {
				?>
					<a href="/">Strona główna</a>&nbsp;<a href="/gallery">Galeria</a>
				<?php
					} else {
						print $nav->setLinkLast(true)->setSeparator('&nbsp;')->render();
					}
				?>
			</li>
			<li class="kontakt"><a href="<?php print $this->url(array('alias' => 'kontakt'),'site')?>"><b>Kontakt</b></a></li>
		</ul>
	</div>

	<div id="site-content">
		<div id="sidebar">
		
			<div class="listbox articles">
				<h2>Artykuły</h2>
				<div class="list">
				<?php
					$navigation = $this->site()
										->childrens(array(
											'alias' => $this->urlParams('alias'),
											'id' => $this->urlParams('id')))
										->setDepthLevel(1)
										->render();
					if ('' != $navigation) {
						print $this->navigation($navigation)->menu();
					}
					
				?>
				</div>
			</div>
			
			<div class="specialProducts featured">
				<h2>Polecane produkty</h2>
				
				<?php
					print $this->getHelper('ShopPromotions')
							   ->shopPromotions()
							   ->render();
				?>
				
			</div>
		</div>
		
		<div id="main">
			<div class="radius_top"></div>
			<div class="inner">
				<?php print $this->layout()->content?>
			</div>
			<div class="radius_bottom"></div>
		</div>
	</div>
	
	<div id="footer" class="sg">
		<?php print $this->partial('_partial/foot.phtml')?>
	</div>
</div>
<?php print $this->inlineScript()?>
</body>
</html>